package com.hup.udptest;

import com.hup.udptest.view.MainFrame;
import com.hup.utils.commons.start.AppInfo;
import com.hup.utils.commons.start.LookThemeUtil;
import com.hup.utils.commons.start.StartUpWindow;
import com.hup.utils.commons.swing.SwingExecutable;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author caigh
 * @date 2023/2/9
 */
@ComponentScan(basePackages = {"com.hup.utils.commons.start", "com.hup.udptest"})
@SpringBootApplication
@AppInfo(chName = "UDPTest")
public class UDPTest {

    public static void main(String[] args) {
        LookThemeUtil.initNormal(null);
        StartUpWindow.startUp(() -> init(args));
    }

    private static void init(String[] args) {
        SpringApplicationBuilder builder = new SpringApplicationBuilder(UDPTest.class);
        builder.headless(false).run(args);

        SwingExecutable.initSwingExecutor();
        new MainFrame().setVisible(true);
    }

}
